from django.db import models
import datetime
# Create your models here.
class Employ(models.Model):
	GENDER_CHOICES_DEPART=(
		(0,'管理员'),
		(1,'书记'),
		(2,'院长'),
		(3,'院领导'),
		(4,'部门负责人'),
		(5,'其他中层'),
		(6,'专职教师'),
		(7,'辅导员'),
		(8,'普通职工'),
	)
	GENDER_CHOICES_MIDDLE=(
		(1,'是'),
		(0,'否'),
	)
	employ_ID=models.CharField('工号',max_length=30,primary_key=True)
	employ_name=models.CharField('姓名',max_length=30,null=True, blank=True)
	employ_auth = models.IntegerField('考核权限', choices=GENDER_CHOICES_DEPART, null=True, blank=True,default=8)
	employ_depart=models.CharField('部门',max_length=30,default='普通职工')
	employ_ismiddle = models.IntegerField('是否中层', choices=GENDER_CHOICES_MIDDLE, null=True, blank=True, default=0)
	employ_login=models.BigIntegerField('登录密码',blank=True,default=123456)
	employ_has=models.CharField('已评分对象',max_length=2000000,null=True,blank=True,default=' ')

class question(models.Model):
	question_belong = models.CharField('问题所属', max_length=30, null=True, blank=True, default='辅导员')
	question_id = models.AutoField('问题编号', primary_key=True)
	question_title=models.CharField('问题标题',max_length=30,null=True,blank=True,default='问题标题')
	question_text = models.TextField('问题内容',null=True)
	question_sorce=models.IntegerField('问题分值',null=True, blank=True,default=25)

class time(models.Model):
	time_start=models.DateTimeField('开始日期', default=datetime.datetime(2018, 9, 9, 0, 0, 0))
	time_end=models.DateTimeField('结束日期', default = datetime.datetime(2020, 9, 9, 0, 0, 0))

class scorer(models.Model):

	scorer_appraiser=models.CharField('评价人ID',max_length=30, null=True, blank=True,)
	scorer_appraisered=models.CharField('被评价人ID',max_length=30, null=True, blank=True,)
	scorer_value=models.BigIntegerField('分数', null=True, blank=True,)

class Department(models.Model):
	GENDER_CHOICES_DEPART = (
		(0, '管理员'),
		(1, '书记'),
		(2, '院长'),
		(3, '院领导'),
		(4, '部门负责人'),
		(5, '其他中层'),
		(6, '专职教师'),
		(7, '辅导员'),
		(8, '普通职工'),
	)
	#Department_ID=models.CharField('部门ID',max_length=30,primary_key=True)
	Department_depart=models.CharField('部门',max_length=30)
	employ_auth = models.IntegerField('考核权限', choices=GENDER_CHOICES_DEPART, null=True, blank=True, default=8)
	Department_manage_name=models.CharField('主管院领',max_length=30,null=True,blank=True)
	calculate=models.text= models.TextField('计算方式',null=True)


